<!DOCTYPE html>
<html>
	<head>		
		<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
		<link rel="icon" href="http://wechat.monmondecake.com/monmomde/cakewap/images/favicon.ico" type="image/x-ico"/>
		<meta charset="UTF-8">
		<script type="text/javascript" src="http://cms.monmondecake.com/js/thirdparty/jquery.min.js"></script>
		<script type="text/javascript" src="http://cms.monmondecake.com/ext/ux/fusioncharts.js"></script>
		<script type="text/javascript" src="http://cms.monmondecake.com/ext/ux/fusioncharts.theme.fint.js"></script>
		<script type="text/javascript" src="http://cms.monmondecake.com/ext/ux/fusioncharts.powercharts.js"></script>
		<style type="text/css">
			*{padding:0px;margin:0px;color: #6F6F6F;}
			header{width: 100%;height: 62px;text-align: center;line-height: 62px;font-weight: bold;}
			header span{background: url(http://image.monmondecake.com/logo.png) no-repeat;background-size: 20%;width: 30%;height: 102px;position: absolute;left: 5%;top:5px;text-align:center}
			.black{color: #000000;font-weight: bold;}
			.mt18{margin-top:18px}
			.fr{float: right;}
			table{width: 90%;margin: 0 5%;border-top: 1px solid #000;border-left: 1px solid #000;border-collapse: collapse;table-layout: fixed;word-break: break-all;word-wrap: break-word;}
		    tr{display: table-row;vertical-align: inherit;border-color: inherit;height: 20px;line-height:20px ;}
		    table td,table th{padding: 1.5mm;border-bottom: 1px solid #000;border-right: 1px solid #000;text-align: left;empty-cells: show;word-break: break-all;}
		    table td{color: #000000;font-weight: bold;}
		    
		    .bbimg{width: 90%;margin: 15px 5%;}
		    .bbimg .img1{width: 100%;}
		    .bbimg .img2{width: 50%;}
		    P{margin-bottom:10px ;}
		</style>
   </head>
	<body>		
		<header><span></span>MM Daily Sales Report-${reportDate}</header>
		<section>
			    <table class="mobile_table">
					<tr>
						<th>Order Review</th>
						<th>B2C Order</th>
						<th>B2C Revenue</th>
						<th>B2C Received Cash</th>
						<th>B2B Order</th>
					</tr>
				 <#if (orderReport?size>0) >	
			       <#list orderReport as order> 
					<tr>
						<td>${order.orderReview}</td>
					    <td>${order.b2cOrderNum}</td>
					    <td>${order.b2cTotalAmount}</td>
					    <td>${order.b2cPayAmount}</td>
					    <td>${order.b2bOrderNum}</td>
					</tr>
				   </#list>
				<#else>
				     <tr>
						<td>NO Date!</td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
					</tr>  
			    </#if> 	
			</table>
			
			<table class="mobile_table mt18">
				<tr>
					<th>B2B Revenue</th>
					<th>B2B Received Cash</th>
					<th>Total Order</th>
					<th>Total Revenue</th>
					<th>Total Received Cash</th>
				</tr>
				<#if (orderReport?size>0) >	
			       <#list orderReport as order> 
					<tr>
						<td>${order.b2bTotalAmount}</td>
					    <td>${order.b2bPayAmount}</td>
					    <td>${order.totalOrder}</td>
					    <td>${order.totalAmount}</td>
					    <td>${order.payAmount}</td>
					</tr>
				   </#list>
				 <#else>
				     <tr>
						<td>NO Date!</td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
					</tr>  
			    </#if> 	  
			</table>
			
			<table  class="pc_table">
				<tr>
					<th>Order Review</th>
					<th>B2C Order</th>
					<th>B2C Revenue</th>
					<th>B2C Received Cash</th>
					<th>B2B Order</th>
					<th>B2B Revenue</th>
					<th>B2B Received Cash</th>
					<th>Total Order</th>
					<th>Total Revenue</th>
					<th>Total Received Cash</th>
				</tr>
			  <#if (orderReport?size>0) >	
				<#list orderReport as order> 
			       <tr>
					<td>${order.orderReview}</td>
					<td>${order.b2cOrderNum}</td>
					<td>${order.b2cTotalAmount}</td>
					<td>${order.b2cPayAmount}</td>
					<td>${order.b2bOrderNum}</td>
					<td>${order.b2bTotalAmount}</td>
					<td>${order.b2bPayAmount}</td>
					<td>${order.totalOrder}</td>
					<td>${order.totalAmount}</td>
					<td>${order.payAmount}</td>
				  </tr>
			    </#list>
			  <#else>
				     <tr>
						<td>NO Date!</td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
					</tr>  
			  </#if> 	 
			</table>
			<table class="mt18">
				<tr>
					<th>Order Total</th>
					<th>Orders</th>
					<th>Revenues</th>
				</tr>
			 <#if (orderTimeReport?size>0) >		
				<#list orderTimeReport as orderTime> 
				  <tr>
					<td>${orderTime.orderTime}</td>
					<td>${orderTime.orderNumber}</td>
					<td>${orderTime.totalAmount}</td>
				  </tr>
			    </#list>
			  <#else>
				     <tr>
						<td>NO Date!</td>
						<td></td>
						<td></td>
					</tr>  
			    </#if> 	  
			</table>
			
			<table class="mt18">
				<tr>
					<th>产品名称</th>
					<th>规格</th>
					<th>原价</th>
					<th>销售数量</th>
					<th>销售总额</th>
				</tr>
			 <#if (orderGoodsReport?size>0) >	
				<#list orderGoodsReport as orderDetail> 
				   <tr>
						<td>${orderDetail.goodsName}</td>
						<td>${orderDetail.goodsWeight}</td>
						<td>${orderDetail.goodsPrice}</td>
						<td>${orderDetail.goodsNumber}</td>
						<td>${orderDetail.totalAmount}</td>
				   </tr>
				</#list>
				<tr><td colspan="5">总计：${sumAllOrderAmount}</td></tr>
			 <#else>
				     <tr>
						<td>NO Date!</td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
					</tr>  
			 </#if> 		
			</table>
		</section>
		<div class="bbimg">
			<p><b>Sales Trend</b></p>
			<div id="orderTotalAmountDiv"></div>
			<p><b>MTD</b></p>
			<div id="orderGoodsAmountDiv"></div>
		</div>
		<script type="text/javascript">
		  //订单销售额
		  var jsonData =${listOrderGoodsAmount};
		   var myChart = new FusionCharts({
						type : 'pie2d',
						width : "100%",
						height : "400",
						renderAt : 'orderGoodsAmountDiv',
						dataFormat : 'json',
						dataSource : {
							chart : {
								caption : "销售金额统计",
								bgColor : "#ffffff",
								use3DLighting : 0,
								showPercentValues : 1,
								showPercentInTooltip : 0,
								"toolTipColor" : "#ffffff",
								"toolTipBorderThickness" : "0",
								"toolTipBgColor" : "#000000",
								"toolTipBgAlpha" : "80",
								"toolTipBorderRadius" : "2",
								"toolTipPadding" : "5",
								"showHoverEffect" : "1",
								"showLegend" : "1",
								"legendBgColor" : "#ffffff",
								"legendBorderAlpha" : "0",
								"legendShadow" : "0",
								"legendItemFontSize" : "10",
								"legendItemFontColor" : "#666666",
								"useDataPlotColorForLabels" : "1",
								"smartLineColor": "#FF0000"
							},
							data : jsonData.list
						}
					});
			myChart.render();
		   //销售金额走势图
		   var jsonAmountData =${listOrderTotalAmount};
		   var myChartAmount = new FusionCharts({
						type : 'line',
						width : "100%",
						height : "300",
						renderAt : 'orderTotalAmountDiv',
						dataFormat : 'json',
						dataSource : {
							chart : {
								"caption": "销售额",
						        "xaxisname": "日期",
						        "yaxisname": "金额",
						        "showlabels": "1",
						        "showalternatehgridcolor": "1",
						        "alternatehgridcolor": "ff5904",
						        "divlinecolor": "ff5904",
						        "divlinealpha": "20",
						        "alternatehgridalpha": "5",
						        "canvasbordercolor": "666666",
						        "canvasborderthickness": "1",
						        "basefontcolor": "666666",
						        "linecolor": "FF5904",
						        "linealpha": "85",
						        "showvalues": "1",
						        "rotatevalues": "1",
						        "valueposition": "auto",
						        "canvaspadding": "8",
						        "bgcolor": "ffffff",
						        "valuepadding": "5",
						        "showborder": "0"
							},
							data : jsonAmountData.list
						}
					});
			myChartAmount.render();
		</script>
		
		
		<script>
			var u = navigator.userAgent;
            if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1 || u.indexOf('iPhone') > -1 || /ipad/i.test(navigator.userAgent.toLowerCase())) {//安卓手机
            	$(".mobile_table").show();
            	$(".pc_table").hide();
            	$("header span").css({"width":"50%","top":"20px"});
            }else{
            	$(".mobile_table").hide();
            	$(".pc_table").show();
            }
		</script>
	</body>
</html>